Stock Ledger
1: UI Components & Filters
- Given the user navigates to the Stock Ledger module,
- Then the system must display the following mandatory dropdown filters:
- Party Type (e.g., Company)
- Party Name (e.g., QA Sons)
- Item Name (e.g., abc raw)
- Warehouse Name (e.g., Main Warehouse 88)
- And display actionable buttons for "Filter" and "Preview".
2: Data Grid Columns
- When the user generates the ledger report,
- Then the results grid must display the following columns:
- Document (Transaction type, e.g., Opening Balance, Purchase Invoice, Closing Balance)
- Doc No. (Reference number)
- Doc Date (Date of transaction)
- Debit (Quantity moving out / deducted)
- Credit (Quantity moving in / added)
- Balance (Running total quantity)
3: Ledger Calculation & Flow
- Given a filtered stock ledger is displayed,
- Then the first row must represent the Opening Balance for the selected period.
- And any inward transaction (like a Purchase Invoice) must display the quantity in the Credit column and logically increase the Balance.
- And any outward transaction (like a Sales Invoice/Dispatch) must display the quantity in the Debit column and logically decrease the Balance.
- And the final row must accurately calculate and display the Closing Balance (e.g., excluding pending bookings, if applicable).
4: Data Validation
- Given the user tries to click "Filter" or "Preview" without selecting mandatory fields (indicated by *),
- Then the system should prompt the user to select the required dropdowns (Party Type, Party Name, Item Name) before generating the table.